Optimal. Leaf size=73 \[ a^5 x-\frac {i a^5 \log (\cos (c+d x))}{d}-\frac {2 i a^7}{d (a-i a \tan (c+d x))^2}+\frac {4 i a^6}{d (a-i a \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45}
\begin {gather*} -\frac {2 i a^7}{d (a-i a \tan (c+d x))^2}+\frac {4 i a^6}{d (a-i a \tan (c+d x))}-\frac {i a^5 \log (\cos (c+d x))}{d}+a^5 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3568
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+i a \tan (c+d x))^5 \, dx &=-\frac {\left (i a^5\right ) \text {Subst}\left (\int \frac {(a+x)^2}{(a-x)^3} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^5\right ) \text {Subst}\left (\int \left (\frac {4 a^2}{(a-x)^3}-\frac {4 a}{(a-x)^2}+\frac {1}{a-x}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=a^5 x-\frac {i a^5 \log (\cos (c+d x))}{d}-\frac {2 i a^7}{d (a-i a \tan (c+d x))^2}+\frac {4 i a^6}{d (a-i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.54, size = 110, normalized size = 1.51 \begin {gather*} \frac {a^5 \left (2 i+\cos (2 (c+d x)) \left (-i+2 d x-i \log \left (\cos ^2(c+d x)\right )\right )+\left (1-2 i d x-\log \left (\cos ^2(c+d x)\right )\right ) \sin (2 (c+d x))\right ) (\cos (2 c+7 d x)+i \sin (2 c+7 d x))}{2 d (\cos (d x)+i \sin (d x))^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 187 vs. \(2 (68 ) = 136\).
time = 0.22, size = 188, normalized size = 2.58
method | result | size |
risch | \(-\frac {i a^{5} {\mathrm e}^{4 i \left (d x +c \right )}}{2 d}+\frac {i a^{5} {\mathrm e}^{2 i \left (d x +c \right )}}{d}-\frac {2 a^{5} c}{d}-\frac {i a^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(68\) |
derivativedivides | \(\frac {i a^{5} \left (-\frac {\left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+5 a^{5} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )-\frac {5 i a^{5} \left (\sin ^{4}\left (d x +c \right )\right )}{2}-10 a^{5} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {5 i a^{5} \left (\cos ^{4}\left (d x +c \right )\right )}{4}+a^{5} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(188\) |
default | \(\frac {i a^{5} \left (-\frac {\left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+5 a^{5} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )-\frac {5 i a^{5} \left (\sin ^{4}\left (d x +c \right )\right )}{2}-10 a^{5} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {5 i a^{5} \left (\cos ^{4}\left (d x +c \right )\right )}{4}+a^{5} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(188\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 88, normalized size = 1.21 \begin {gather*} \frac {2 \, {\left (d x + c\right )} a^{5} + i \, a^{5} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac {4 \, {\left (2 \, a^{5} \tan \left (d x + c\right )^{3} - 3 i \, a^{5} \tan \left (d x + c\right )^{2} - i \, a^{5}\right )}}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 51, normalized size = 0.70 \begin {gather*} \frac {-i \, a^{5} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a^{5} e^{\left (2 i \, d x + 2 i \, c\right )} - 2 i \, a^{5} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.28, size = 102, normalized size = 1.40 \begin {gather*} - \frac {i a^{5} \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \begin {cases} \frac {- i a^{5} d e^{4 i c} e^{4 i d x} + 2 i a^{5} d e^{2 i c} e^{2 i d x}}{2 d^{2}} & \text {for}\: d^{2} \neq 0 \\x \left (2 a^{5} e^{4 i c} - 2 a^{5} e^{2 i c}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 450 vs. \(2 (63) = 126\).
time = 0.81, size = 450, normalized size = 6.16 \begin {gather*} -\frac {2 i \, a^{5} e^{\left (16 i \, d x + 8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 16 i \, a^{5} e^{\left (14 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 56 i \, a^{5} e^{\left (12 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 112 i \, a^{5} e^{\left (10 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 112 i \, a^{5} e^{\left (6 i \, d x - 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 56 i \, a^{5} e^{\left (4 i \, d x - 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 16 i \, a^{5} e^{\left (2 i \, d x - 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 140 i \, a^{5} e^{\left (8 i \, d x\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 2 i \, a^{5} e^{\left (-8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + i \, a^{5} e^{\left (20 i \, d x + 12 i \, c\right )} + 6 i \, a^{5} e^{\left (18 i \, d x + 10 i \, c\right )} + 12 i \, a^{5} e^{\left (16 i \, d x + 8 i \, c\right )} - 42 i \, a^{5} e^{\left (12 i \, d x + 4 i \, c\right )} - 84 i \, a^{5} e^{\left (10 i \, d x + 2 i \, c\right )} - 48 i \, a^{5} e^{\left (6 i \, d x - 2 i \, c\right )} - 15 i \, a^{5} e^{\left (4 i \, d x - 4 i \, c\right )} - 2 i \, a^{5} e^{\left (2 i \, d x - 6 i \, c\right )} - 84 i \, a^{5} e^{\left (8 i \, d x\right )}}{2 \, {\left (d e^{\left (16 i \, d x + 8 i \, c\right )} + 8 \, d e^{\left (14 i \, d x + 6 i \, c\right )} + 28 \, d e^{\left (12 i \, d x + 4 i \, c\right )} + 56 \, d e^{\left (10 i \, d x + 2 i \, c\right )} + 56 \, d e^{\left (6 i \, d x - 2 i \, c\right )} + 28 \, d e^{\left (4 i \, d x - 4 i \, c\right )} + 8 \, d e^{\left (2 i \, d x - 6 i \, c\right )} + 70 \, d e^{\left (8 i \, d x\right )} + d e^{\left (-8 i \, c\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.31, size = 64, normalized size = 0.88 \begin {gather*} \frac {a^5\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{d}-\frac {4\,a^5\,\mathrm {tan}\left (c+d\,x\right )+a^5\,2{}\mathrm {i}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,2{}\mathrm {i}-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________